{{#with borrow}}
<div class="hide aaa">
<span id="aprVal">{{apr}}</span> <!--年化利率-->
<span id="limitVal" >{{timeLimit}}</span>
<span id="moneyVal" >{{account}}</span>
<span id="styleVal" >{{style}}</span>
<span id="isDayVal" >{{borrowTimeType}}</span>
<span id="upMoneyVal" >0</span>
<span id="lowestAccount">{{lowestAccount}}</span>
<span id="mostAccount">{{mostAccount}}</span>
<span id="accountWait">{{../accountWait}}</span>
</div>
{{/with}}

<dl>
<form action="/app/invest/tender.html" name="form1" id="doInvest" method="post" class="amount-form clearfix"
      onkeydown="if(event.keyCode==13) return false; " autocomplete="off">
    {{#with borrow}}
    <dt>

        <h2>{{name}}</h2>

        <div class="per">送加息券</div>


    </dt>
    <img src="/mobile/default/images/qy_banner1.jpg" width="100%">
    <dd class="left-line wi50"><p>投资金额</p>

        <p><em>{{moneyFormat account}}</em>元</p></dd>
    <dd class="left-line"><p>年化利率</p>

        <p><em>{{apr}}</em>%</p></dd>
    <dd><p>投资期限</p>

        <p>{{borrowLimitTimeW borrowTimeType timeLimit}}</p></dd>
    <div class="db">保理机构：<span>上海东虹桥融资担保股份有限公司</span></div>
    <div class="d_table">
        <p><span>收益方式:<em>按月付息，到期还本</em></span><span>开始收益日期:<em>待满标后生成</em></span>
            <!--<span>保障方式<em>100%本息保障</em></span>-->
            <!--<span>投标截止日期: <em class="bzicon countDownTime">17天02小时37分01秒</em></span></p>-->

        <div class="bar"><i style="width:{{scales}}%"></i><span class="txt_l">投资进度</span><span class="txt_r">{{scales}}%</span>
        </div>
    </div>
    {{/with}}


    {{#equal borrow.status 59}}
    <div class="amount-form-box borrow_user_tip pt30 pl30 pr30">
        <dl><dt>对不起！</dt><dd class="qd-investError">该标已被管理员撤回。</dd></dl>
    </div>
    <input type="hidden" id="bid_id" value="{{../borrow/id}}" />
    {{/equal}}
    {{#equal borrow.status 0}}
    <div class="amount-form-box borrow_user_tip pt30 pl30 pr30">
        <dl><dt>对不起！</dt><dd class="qd-investError">等待管理员初审，不能进行投资。</dd></dl>
    </div>
    <input type="hidden" id="bid_id" value="{{../borrow/id}}" />
    {{/equal}}

    {{#isNotCanInvestmentStatus borrow.status}} {{! 无法投资状态 }}
    {{#with borrow}}
    <div class="amount-form-box borrow_full pt25 pl30 pr30">
        <p>投资笔数：<em>{{../data.page.total}}笔</em></p>
        <p>当前状态：<em>{{logBorrowStatusFun status scales type flow}}</em></p>
        <p>欢迎进入<a href="/mobile/invest/index.html">投资列表</a>，投资其他借款。</p>
    </div>
    {{/with}}
    {{/isNotCanInvestmentStatus}}


    {{#inequality borrow.status 59}} {{!S 判断是否已被撤回 status=59 后台撤回}}
    {{#inequality borrow.status 0}}  {{!S 判断是否为预览页面 status=0}}
    {{#equal borrow.status 1}} {{!S 初审通过的标 status=1}}
    {{#if borrowPreview}}

    {{#equal userType 2}}
    <div class="amount-form-box borrow_user_tip pt10 pl30 pr30">
        <dl><dt><i class="iconfontol">&#xe60f;</i>对不起！</dt><dd>借款人，不能进行投资。</dd></dl>
        <a class="login_account" href="/mobile/usercenter/main.html">进入账户中心</a>
    </div>
    <input type="hidden" id="bid_id" value="{{../borrow/id}}"/>
    {{/equal}}

    {{#inequality userType 2}}{{!S 判断用户类型是否为非借款用户}}

    {{#equal borrow/scales 100}} {{! S已满标}}
    {{#with borrow}}
    <div class="amount-form-box borrow_full pt20 pl30">
        <p>投资笔数<em class="colee5545">{{../data.page.total}}</em><font>笔</font></p>
        <p>当前状态<em>{{logBorrowStatusFun status scales type flow}}</em></p>
        <p class="disabled_btn">投资已结束</p>
        <p class="mt10 mr30 textcenter">欢迎进入<a href="/mobile/invest/index.html">投资列表</a>，投资其他借款。</p>
    </div>
    {{/with}}
    <input type="hidden" id="bid_id" value="{{../borrow/id}}" />
    {{/equal}} {{! E已满标}}

    {{#inequality borrow/scales 100}} {{!S 未满标}}
    {{!-- S 新标预告--}}
    {{#showCountDown borrow.putStartTime serverNowTime}}
    <div class="invest-btns">
        <div class="invest-showCountDown">
            <label>离开标仅剩</label>
            <p><span id="showCountDownTime">{{{showCountDownTimeFun borrow.putStartTime serverNowTime}}}</span></p>
        </div>
    </div>
    <div class="form-group" style="display:none;">
        <input type="text" placeholder="投标金额" autocomplete="off" maxlength="7" readonly="readonly" />
    </div>
    <div class="form-group" style="display:none;">

        <input type="password" class="payPwdText" size="11" placeholder="" autocomplete="off"/>
        <input type="password" class="payPwd" placeholder="交易密码" autocomplete="off" style="display:none;"/>
    </div>
    <div class="form-action " style="display:none;"><p class="doNotInvest">立即投资</p></div>
    {{else}}
    {{!-- S 通过canTender判断用户是否可投当前标--}}

    {{#if canTender}}
    <div class="t_info">
        <a href="#" class="btn_cz">充值</a>
        {{#with account}}
        <p>可投金额 <span> <em>{{moneyFormat ../../accountWait}} </em>元</span></p>

        <p>可用余额 <span> <em>{{moneyFormat useMoney}} </em>元</span></p>

        {{#inequality ../borrow.type 101}}{{!-- 非秒标 --}}
        <p> <span> <em class="finalInvestIncome" title="预期收益">预期收益 0.00 元</em></span></p>

        <!--<a href="javascript:;" class="finalInvestIncome" title="预期收益"></a>-->
        <!--<a href="javascript:;" class="finalActualPayment" title="实际支付"></a>-->
        <a href="javascript:;" class="finalInvestMoney" title="实际投资"></a>

        {{/inequality}}
        <!--<p class="tip"> *余额不足，请充值/投资最小单位为{{bidLimit borrow.lowestAccount}}元 </p>-->
    </div>
    <div class="t_info1">
        <input type="text" id="money"  class="full_w" name="money" size="11" onKeyUp="replaceAndSetPos(this,/[^0-9]/g,'')" placeholder="100.00元起投 " autocomplete="off" maxlength="7" />

        <div class="tip form_group_tip form_mony_tip hide">
            *请输入投标金额进行投标
        </div>

        <!--<a class="btn11 choiceRedPacket">使用红包</a>-->
        <!--<a class="btn11 choiceCoupon" style="float: right;">使用加息券</a>-->
        <!--<a class="btn11">立即投资</a> <a class="btn12">一锤定音</a>-->


        {{#inequality ../borrow.type 101}}{{!-- 非秒标 --}}
        {{#inequality ../../borrow.category 0}}{{!-- 是否新手标 --}}
        <!--<div class="form-experience">-->
            <!--<a href="javascript:;" class="choiceExperience" title="使用体验券">使用体验券&nbsp;&gt;&gt;</a>-->
        <!--</div>-->
        {{/inequality}}
        {{#equal ../../borrow.category 1}}
        <!--<div class="form-red"><a href="javascript:;" class="choiceRedPacket" title="我的红包">我的红包&nbsp;&gt;&gt;</a></div>-->
        <!--<div class="form-coupon"><a href="javascript:;" class="choiceCoupon" title="使用加息券">使用加息券&nbsp;&gt;&gt;</a></div>-->
        <!--<a class="btn11 choiceRedPacket">使用红包</a>-->
        <!--<a class="btn11 choiceCoupon" style="float: right;">使用加息券: 0元</a>-->
        {{/equal}}
        {{/inequality}}
        {{#equal ../borrow.type 101}}
        <div class="form-finalActualPayment" style="display:none;">
            <a href="javascript:;" class="finalActualPayment" title="实际支付"></a>
            <a href="javascript:;" class="finalInvestMoney" title="实际投资"></a>
        </div>
        {{/equal}}

        {{!S 是否开启定向密码}}
        {{#if ../isDirectional}}
        <div class="form-group">
            <input type="password" class="isDirectionalText full_w"  size="11"  placeholder="定向密码" autocomplete="off"/>
            <input type="password" class="isDirectional full_w"  name="pwd" size="11" placeholder="定向密码" autocomplete="off" style="display:none;"/>
            <div class="form_group_tip form_directional_tip hide"></div>
        </div>
        {{/if}}
        {{!E 是否开启定向密码}}
        {{!S 交易密码相关}}
        {{#equal ../../payPwd false}}
        <div class="form-group" style="position:relative">
            <!--<input type="password" class="payPwdText full_w " placeholder="交易密码" size="11" autocomplete="off"  />-->
            <input type="password" class="payPwd full_w"  name="payPwd" size="11" placeholder="交易密码" autocomplete="off"  style=""/>
            <div class="form_group_tip form_trade_tip hide"></div>

        </div>
        <a href="/mobile/usercenter/security/modifyPaypwd.html" class="forgetPassword">忘记交易密码？</a>
        <div class="form-action">
            <!--<input type="button" value="立即投资" class="qd-red-btn sub-invest-btn" id="immediateInvestment"/>-->
            <div class="t_info1">
                <!--<input class="full_w" type="text" id="pay_jine" placeholder=" 800.00元起投"/>-->
                <input type="button" value="立即投资" class="qy_btn" id="immediateInvestment"/>
                <!--<a class="qy_btn" id="immediateInvestment">立即投资</a>-->
            </div>
        </div>
        {{else}}
        <div class="qd-clear"></div>
        <div class="form-group clearboth">交易密码：<a href="/mobile/usercenter/security/modifyPaypwd.html" style="color:#c83e41">请设置交易密码</a></div>
        <div class="form-action">
            <a class="gray_btn">立即投资</a>
        </div>
        {{/equal}}
        {{!E 交易密码相关}}
        <div class="form-action">
            <input type="hidden" id="bid_id" name="id" value="{{../borrow/id}}"/>
            <input type="hidden" name="tenderToken" value="{{../tenderToken}}"/>
        </div>

        {{/with}}






        {{!S红包dom结构}}
        <div  id="choiceRedPacket" class="hide choiceRedPacketBox">
            <!--<label class="checkAllRedPacket" for="checkAllRedPacket"><input type="checkbox" id="checkAllRedPacket"/>全选</label>-->
            <div class="redPacketTips hide"></div>
            <ul id="redPacketList" class="clearfix"></ul>
            <p class="redPackerShowTxt">选中红包总额：<span class="choiceRedPacketMoney">0</span>元&nbsp;&nbsp;实际支付金额：<span class="investMoney">0</span>元</p>
            <div class="formula">投资可使用红包额度=投资金额*<span class="redPackageRate"></span>%</div>
            <div class="redPacketConfirm"><a href="javascript:;" id="redPacketConfirm" class="green-btn">确定</a></div>
            <input type="hidden" id="redMoneyIdArry" name="redEnvelopeStr" value="" />
        </div>
        {{!E红包dom结构}}
        {{!S体验券dom结构}}
        <div id="choiceExperience" class="hide choiceExperienceBox">
            <label class="checkAllExperience" for="checkAllExperience"><input type="checkbox" id="checkAllExperience"/>全选</label>
            <div class="experienceTips hide"></div>
            <ul id="experienceList" class="clearfix"></ul>
            <p class="redPackerShowTxt">选中体验券总额：<span class="choiceExperienceMoney">0</span>元</p>
            <div class="formula experienceFormula"></div>
            <div class="experienceConfirm"><a href="javascript:;" id="experienceConfirm" class="green-btn">确定</a></div>
        </div>
        {{!E体验券dom结构}}

        {{!S加息券dom结构}}
        <div id="choiceExperience" class="hide choiceExperienceBox">
            <label class="checkAllExperience" for="checkAllExperience"><input type="checkbox" id="checkAllExperience"/>全选</label>
            <div class="experienceTips hide"></div>
            <ul id="experienceList" class="clearfix"></ul>
            <p class="redPackerShowTxt">选中体验券总额：<span class="choiceExperienceMoney">0</span>元</p>
            <div class="formula experienceFormula"></div>
            <div class="experienceConfirm"><a href="javascript:;" id="experienceConfirm" class="green-btn">确定</a></div>
        </div>
        <div id="choiceCoupon" class="hide choiceCouponBox">
            <ul id="couponList" class="clearfix"></ul>
            <p class="redPackerShowTxt">
                选择加息券：<span class="choiceCouponMoney">0</span>%&nbsp;&nbsp;
                增加收益：<span class="couponMoney">0</span>元</p>
            <a href="javascript:;" id="couponConfirm" class="couponConfirm" data-val="">确定</a>
            <div class="qd-cleaer"></div>

        </div>
        {{!E加息券dom结构}}

        <!--隐藏域-->
        <input type="hidden" id="redPackageRate" value="0"/>
        <!-- 红包可使用占比投资金额最大比例 -->
        <!-- S 体验券 -->
        <input type="hidden" id="experienceMoney" value="0" />
        <input type="hidden" id="experienceMoneyIdArry" value="" />
        <input type="hidden" id="canUseExperienceMoney" value="" />
        <!-- E 体验券隐藏域 -->

        <!-- S 加息券隐藏域 -->
        <input type="hidden" id="canUseCouponMoney" value="" />
        <input type="hidden" name="myRIRCouponId" class="myRIRCouponId" value="" />
        <!-- E 加息券隐藏域 -->
        <input type="hidden" name="uuid" id="uuid" value="{{../borrow/uuid}}"/>
        <!--隐藏域-->
    </div>
    {{else}}
    <p class="noInvest"></p>
    {{/if}}
    {{/showCountDown}}
    {{!-- E 新标预告--}}

    {{/inequality}}{{!E 判断是否满标}}
    {{/inequality}}{{!E 判断用户类型是否为非借款用户}}
    {{else}}
    <div class="amount-form-box borrow_user_tip pt10 pl30 pr30">
        <dl><dt>对不起！</dt><dd>此页面为预览页面，不能进行投资。</dd></dl>
    </div>
    <input type="hidden" id="bid_id" value="{{../borrow/id}}" />
    {{/if}} {{! E前台投标}}
    {{/equal}}  {{! E初审通过的标}}
    {{/inequality}} {{!E 判断是否为预览页面 status=0}}
    {{/inequality}} {{!E 判断是否已被撤回 status=59 后台撤回}}
</form>
</dl>

<dl class="mar40 detail_layer">
<!--<a class="tzlc1">投资流程<span></span></a>-->
<a class="xmxq1">项目详情<span></span></a>
<!--<a class="fxkz1">风险控制<span></span></a>-->
<a class="tzjl1">投资记录<span></span></a>
<a class="tpzl1">图片资料<span></span></a>
</dl>

        <!--<#assign menuActive="1">-->
        <!--弹出 投资流程-->

        <!--弹出 项目详情-->
<div class="box" style="display:none" id="xmxq">
<div class="demo"><a class="btnCancel"></a>

    <div class="head1">项目详情</div>
    <div class="content_1">{{borrowDetailContent borrow.content}}</div>
</div>
</div>
        <!--弹出 风控-->
<div class="box" style="display:none" id="fxkz">
<div class="demo"><a class="btnCancel"></a>

    <div class="head1">风险控制</div>
    <div class="content_1"></div>
</div>
</div>


        <!--弹出 投资记录-->
<div class="box" style="display:none" id="tzjl">
<div class="demo"><a class="btnCancel"></a>

    <div class="head1">投资记录</div>
    <div class="content_1">
        <ul>
            <li>
                <span class="txt_2">一马当先</span>
                <span class="txt_3">
                {{#if firstTender}}
                    {{firstTender.mobile}}
                    <em>{{firstTender.money}}</em>
                    {{else}}
                    <p class="qd_detail_jqqd">敬请期待</p>
                    {{/if}}
                </span>
            </li>
            <li>
                <span class="txt_2">一锤定音</span>
                <span class="txt_3">
                {{#if lastTender}}
                    {{lastTender.mobile}}
                    <em>{{lastTender.money}}</em>
                    {{else}}
                    <p class="qd_detail_jqqd">敬请期待</p>
                    {{/if}}
                </span>
            </li>
            <li>
                <span class="txt_2">一鸣惊人</span>
                <span class="txt_3">
                {{#if mostTender}}
                    {{mostTender.mobile}}
                    <em>{{mostTender.money}}</em>
                    {{else}}
                    <p class="qd_detail_jqqd">敬请期待</p>
                    {{/if}}
                </span>
            </li>
        </ul>

        <p class="num_1">投资人数<span>{{tenderUserCount}}</span>位</p>

        <div style="height: 300px;overflow: scroll;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                    <th width="60" height="30" align="center">投资人</th>
                    <th width="100" align="right">投资金额</th>
                    <th align="center">投资时间</th>
                </tr>
                {{#each data.list}}
                <tr>
                    <td width="" height="46" align="center">{{userName}}</td>
                    <td width="" align="right">{{money}}</td>
                    <td align="center">{{transFormatDate addTime}}</td>
                </tr>
                {{/each}}

                </tbody>
            </table>
        </div>
    </div>
</div>
</div>
        <!--弹出图片资料-->
<div class="box" style="display:none" id="tpzl">
<div class="demo"><a class="btnCancel"></a>

    <div class="head1">图片资料</div>
    <div class="content_1 invest_image_layer" style="height: 300px;">
        {{#each borrowUploads}}
        <img src="{{../url}}/{{picPath}}" alt=""/>
        {{/each}}
    </div>
</div>
</div>